package com.eselect.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.ToString;

@TableName("user")
@Data
@ToString
public class User {

    @TableId("id")
    private Long id;

    @TableField("username")
    private String username;

    @TableField("name")
    private String name;

    @TableField("age")
    private Integer age;

    public User(String username, String name, Integer age) {
        this.username = username;
        this.name = name;
        this.age = age;
    }

    public static User userBuilder(String username, String name, Integer age){
        return new User(username, name, age);
    }
}
